package config

type MySQLConfig struct {
	Host     string `mapstructure:"host" json:"host"`
	Port     int    `mapstructure:"port" json:"port"`
	Name     string `mapstructure:"db" json:"db"`
	User     string `mapstructure:"user" json:"user"`
	Password string `mapstructure:"password" json:"password"`
}
type RedisConfig struct {
	Host   string `mapstructure:"host" json:"host"`
	Port   int    `mapstructure:"port" json:"port"`
	Expire int    `mapstructure:"expire" json:"expire"`
}

type JWTConfig struct {
	SigningKey string `mapstructure:"key" json:"key"`
}
type RabbitMQ struct {
	Host string `mapstructure:"host" json:"host"`
	Port int    `mapstructure:"port" json:"port"`
	User string `mapstructure:"user" json:"user"`
	Pass string `mapstructure:"pass" json:"pass"`
}
type ServerConfig struct {
	Host         string       `mapstructure:"host" json:"host"`
	Name         string       `mapstructure:"name" json:"name"`
	MySQLInfo    *MySQLConfig `mapstructure:"mysql" json:"mysql"`
	JWTInfo      JWTConfig    `mapstructure:"jwt" json:"jwt"`
	RedisInfo    RedisConfig  `mapstructure:"redis" json:"redis"`
	RabbitMQInfo *RabbitMQ    `mapstructure:"rabbitmq" json:"rabbit_mq"`
}
